# Contributor: Kay Thomas <kaythomas@pm.me>
# Maintainer: Kay Thomas <kaythomas@pm.me>
pkgname=i3lock-color
pkgver=2.13.4
_pkgver=2.13.c.4
pkgrel=1
pkgdesc="Modern version of i3lock with color functionality and other features"
url="https://github.com/Raymo111/i3lock-color"
arch="all"
license="MIT"
depends="xkeyboard-config !i3lock"
makedepends="automake autoconf libev-dev libxkbcommon-dev xcb-util-image-dev
	xcb-util-xrm-dev cairo-dev libjpeg-turbo-dev linux-pam-dev"
subpackages="$pkgname-doc"
source="https://github.com/Raymo111/i3lock-color/archive/$_pkgver.tar.gz"
builddir="$srcdir/$pkgname-$_pkgver"
options="!check" # No testsuite

prepare() {
	default_prepare

	# Fix ticket FS#31544, sed line taken from gentoo
	sed -i -e 's:login:base-auth:g' "$builddir"/pam/i3lock
	autoreconf -fiv
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-debug=no \
		--disable-builddir \
		--disable-sanitizers
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
67b7b558f2894f8a389e559a5b146e176d4d0410b8da2a756190691062fa60e085449bc3afa57cbbdee7d2f002f995649d123bfb9d88eaae55da3cf8f68eee02  2.13.c.4.tar.gz
"
